package com.ti.srpglife.world;

import java.util.HashMap;

import com.badlogic.gdx.math.Vector2;
import com.ti.srpglife.world.level.Level;
import com.ti.srpglife.world.level.LevelLoader;

public class GameWorld 
{
	private Level currentlevel;
	
	public HashMap<String,HashMap<String,String>> partyinfo = new HashMap<String,HashMap<String,String>>();

	public void newChunkSet(String string) 
	{
		LevelLoader.clearChunkedLevels();
		currentlevel = LevelLoader.load(string);
	}
	
	//updates on world need to update level
	public void update(float delta)
	{
		if(currentlevel != null)
			currentlevel.act(delta);
	}
	
	public void render()
	{
		if(currentlevel != null)
			currentlevel.render();
	}

	public void moveCam(Vector2 cammove)
	{
		currentlevel.moveCam(cammove);	
	}

	public void trySelect(int x, int y) 
	{
		currentlevel.trySelect(x,y);
	}

	public void tryAct(int x, int y) 
	{
		currentlevel.tryAct(x,y);
	}
}
